export function getSpicinessText(level) {
  const map = { 0: '不辣', 1: '微辣', 2: '中辣', 3: '重辣' }
  const n = Number(level)
  return Number.isFinite(n) ? (map[n] ?? '不辣') : '不辣'
}

export function getSpicinessClass(level) {
  const n = Number(level)
  return ['mild', 'light', 'medium', 'hot'][n] || 'mild'
}

export default { getSpicinessText, getSpicinessClass }
